var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (!cm.isQuestFinished(41906)) {
                cm.sendOkS("好多的书啊，一定是戴尔罗的珍藏吧？")
            } else {
                if (cm.getStringFromQuestInfo(41927, "lastReadDate") != cm.getNowTimeString(3)) {
                    cm.setNumberForQuestInfo(41927, "lastReadCount", 0);
                    cm.setStringForQuestInfo(41927, "lastReadDate", cm.getNowTimeString(3))
                }
                cm.zeroReadBook(3 - cm.getNumberFromQuestInfo(41927, "lastReadCount"))
            }
            cm.dispose()
        }
    }
};